package com.acminds.fotoporter.persistence.entities;

// Generated Jan 14, 2012 10:31:36 AM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acminds.fotoporter.persistence.dto.*;

/**
 * Feature generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractFeature extends
		com.acminds.fotoporter.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer featureId;
	private FeatureGroup featureGroup;
	private UserInfo userInfo;
	private String featureName;
	private String featureDesc;
	private Date createDate;
	private List<ItemFeature> itemFeatures = new ArrayList<ItemFeature>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "FEATURE_ID", unique = true, nullable = false)
	public Integer getFeatureId() {
		return this.featureId;
	}

	public void setFeatureId(Integer featureId) {
		this.featureId = featureId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FEATURE_GROUP_ID", nullable = false)
	public FeatureGroup getFeatureGroup() {
		return this.featureGroup;
	}

	public void setFeatureGroup(FeatureGroup featureGroup) {
		this.featureGroup = featureGroup;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATED_BY", nullable = false)
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Column(name = "FEATURE_NAME", nullable = false, length = 60)
	public String getFeatureName() {
		return this.featureName;
	}

	public void setFeatureName(String featureName) {
		this.featureName = featureName;
	}

	@Column(name = "FEATURE_DESC", nullable = false, length = 100)
	public String getFeatureDesc() {
		return this.featureDesc;
	}

	public void setFeatureDesc(String featureDesc) {
		this.featureDesc = featureDesc;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", nullable = false, length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "feature")
	public List<ItemFeature> getItemFeatures() {
		return this.itemFeatures;
	}

	public void setItemFeatures(List<ItemFeature> itemFeatures) {
		this.itemFeatures = itemFeatures;
	}

}
